package sort;

import java.util.Random;

public class CommonUtil {

    public static int[] createIntArray(int iCount) {
        int[] arrSrc = new int[iCount];
        for (int i = 0; i < iCount; i++) {
            Random random = new Random();
            arrSrc[i] = random.nextInt(100);
        }

        return arrSrc;
    }

    public static void printArr(int[] arrSrc) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < arrSrc.length; i++) {
            sb.append(arrSrc[i] + ",");
        }
        System.out.println(sb.subSequence(0, sb.lastIndexOf(",")).toString());
    }

}
